package hn.cch.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StopWatch;

public class StopWatchDemo {

    private final static Logger logger = LoggerFactory.getLogger(StopWatchDemo.class);

    public static void main(String[] args) {
        StopWatch stopWatch = new StopWatch();
        for (int i = 0; i < 10; i++) {
            stopWatch.start("Task" + i);
            stopWatch.stop();
        }
        logger.info(stopWatch.prettyPrint());
    }
}
